package com.ruoyi.sl.service.impl;

import java.util.List;

import com.ruoyi.sl.domain.SlAttendance;
import com.ruoyi.sl.domain.SlOddjob;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sl.mapper.SlOddjobAttendanceMapper;
import com.ruoyi.sl.domain.SlOddjobAttendance;
import com.ruoyi.sl.service.ISlOddjobAttendanceService;

/**
 * 零工出勤天数Service业务层处理
 * 
 * @author admin
 * @date 2024-06-16
 */
@Service
public class SlOddjobAttendanceServiceImpl implements ISlOddjobAttendanceService 
{
    @Autowired
    private SlOddjobAttendanceMapper slOddjobAttendanceMapper;

    /**
     * 查询零工出勤天数
     * 
     * @param attendanceId 零工出勤天数主键
     * @return 零工出勤天数
     */
    @Override
    public SlOddjobAttendance selectSlOddjobAttendanceByAttendanceId(Long attendanceId)
    {
        return slOddjobAttendanceMapper.selectSlOddjobAttendanceByAttendanceId(attendanceId);
    }

    /**
     * 查询零工出勤天数列表
     * 
     * @param slOddjobAttendance 零工出勤天数
     * @return 零工出勤天数
     */
    @Override
    public List<SlOddjobAttendance> selectSlOddjobAttendanceList(SlOddjobAttendance slOddjobAttendance)
    {
        return slOddjobAttendanceMapper.selectSlOddjobAttendanceList(slOddjobAttendance);
    }

    /**
     * 查询指定报工人和日期的出勤信息
     *
     * @param slOddjob 报工人和报工日期
     * @return 出勤人集合
     */
    @Override
    public List<SlOddjobAttendance> selectSlOddjobAttendanceByOddjob(SlOddjob slOddjob){
        return slOddjobAttendanceMapper.selectSlOddjobAttendanceByOddjob(slOddjob);
    }

    /**
     * 查询零工出勤天数
     *
     * @param rfworkId 报工单ID
     * @return 出勤人集合
     */
    @Override
    public List<SlOddjobAttendance> selectAllSlOddjobAttendanceByRfworkId(Long rfworkId){
        return slOddjobAttendanceMapper.selectAllSlOddjobAttendanceByRfworkId(rfworkId);
    }



    /**
     * 新增零工出勤天数
     * 
     * @param slOddjobAttendance 零工出勤天数
     * @return 结果
     */
    @Override
    public int insertSlOddjobAttendance(SlOddjobAttendance slOddjobAttendance)
    {
        return slOddjobAttendanceMapper.insertSlOddjobAttendance(slOddjobAttendance);
    }

    /**
     * 修改零工出勤天数
     * 
     * @param slOddjobAttendance 零工出勤天数
     * @return 结果
     */
    @Override
    public int updateSlOddjobAttendance(SlOddjobAttendance slOddjobAttendance)
    {
        return slOddjobAttendanceMapper.updateSlOddjobAttendance(slOddjobAttendance);
    }

    /**
     * 批量删除零工出勤天数
     * 
     * @param attendanceIds 需要删除的零工出勤天数主键
     * @return 结果
     */
    @Override
    public int deleteSlOddjobAttendanceByAttendanceIds(Long[] attendanceIds)
    {
        return slOddjobAttendanceMapper.deleteSlOddjobAttendanceByAttendanceIds(attendanceIds);
    }

    /**
     * 删除零工出勤天数信息
     * 
     * @param attendanceId 零工出勤天数主键
     * @return 结果
     */
    @Override
    public int deleteSlOddjobAttendanceByAttendanceId(Long attendanceId)
    {
        return slOddjobAttendanceMapper.deleteSlOddjobAttendanceByAttendanceId(attendanceId);
    }
}
